package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    //查询所有分类
    List<Category> findAll();

    //新增分类
    void save(Category category);

    //更新分类
    void update(Category category);

    //当前分类下菜品数量
    int countDishByCategoryId(Long id);

    //当前分类下套餐数量
    int countSetmealByCategoryId(Long id);

    //根据id删除
    void delete(Long id);
}
